home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / OCE.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  49.9 KB  |  1,338 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OCE.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment (AOCE) Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT OCE;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __OCE__}
  27. {$SETC __OCE__ := 1}
  28.  
  29. {$I+}
  30. {$SETC OCEIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __ALIASES__}
  37. {$I Aliases.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __APPLEEVENTS__}
  40. {$I AppleEvents.p}
  41. {$ENDC}
  42.  
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. { All utility routines defined here are callable at interrupt level. }
  49.  
  50. TYPE
  51.     OCERecordTypeIndex                    = UInt16;
  52.     OCEAttributeTypeIndex                = UInt16;
  53. { For anyone who absolutely needs a define of the body of the standard record or
  54. attribute type, use these below.  CAUTION!  All the types below are assumed to be
  55. in character set 'smRoman'.  If you try to compare these to some RString or
  56. AttributeType variable, you must take the character set code into account.  Future
  57. standard types may be defined using character sets other than 'smRoman'. }
  58.  
  59. { All these standard definitions begin with the Apple symbol (not shown here).
  60.  
  61. NOTE:  To access these, you must call OCEGetIndRecordType or OCEGetIndAttributeType
  62. with the proper index.  These routines return pointers to the standard type.
  63. This was done so that code fragments (INITs, CDEVs, CSAMs, etc). which cannot
  64. use global data can also use these. }
  65. { Indices for the standard definitions for certain record types (OCERecordTypeIndex): }
  66.  
  67. CONST
  68.     kUserRecTypeNum                = 1;                            {  "User"  }
  69.     kGroupRecTypeNum            = 2;                            {  "Group"  }
  70.     kMnMRecTypeNum                = 3;                            {  "AppleMail™ M&M"  }
  71.     kMnMForwarderRecTypeNum        = 4;                            {  "AppleMail™ Fwdr"  }
  72.     kNetworkSpecRecTypeNum        = 5;                            {  "NetworkSpec"  }
  73.     kADAPServerRecTypeNum        = 6;                            {  "ADAP Server"  }
  74.     kADAPDNodeRecTypeNum        = 7;                            {  "ADAP DNode"  }
  75.     kADAPDNodeRepRecTypeNum        = 8;                            {  "ADAP DNode Rep"  }
  76.     kServerSetupRecTypeNum        = 9;                            {  "Server Setup"  }
  77.     kDirectoryRecTypeNum        = 10;                            {  "Directory"  }
  78.     kDNodeRecTypeNum            = 11;                            {  "DNode"  }
  79.     kSetupRecTypeNum            = 12;                            {  "Setup"  }
  80.     kMSAMRecTypeNum                = 13;                            {  "MSAM"  }
  81.     kDSAMRecTypeNum                = 14;                            {  "DSAM"  }
  82.     kAttributeValueRecTypeNum    = 15;                            {  "Attribute Value"  }
  83.     kBusinessCardRecTypeNum        = 16;                            {  "Business Card"  }
  84.     kMailServiceRecTypeNum        = 17;                            {  "Mail Service"  }
  85.     kCombinedRecTypeNum            = 18;                            {  "Combined"  }
  86.     kOtherServiceRecTypeNum        = 19;                            {  "Other Service"  }
  87.     kAFPServiceRecTypeNum        = 20;                            {  "Other Service afps"  }
  88.     kFirstOCERecTypeNum            = 1;                            {  first standard OCE record type  }
  89.     kLastOCERecTypeNum            = 20;                            {  last standard OCE record type  }
  90.     kNumOCERecTypes                = 20;
  91.  
  92. { Indices for the standard definitions for certain attribute types (OCEAttributeTypeIndex): }
  93.     kMemberAttrTypeNum            = 1001;                            {  "Member"  }
  94.     kAdminsAttrTypeNum            = 1002;                            {  "Administrators"  }
  95.     kMailSlotsAttrTypeNum        = 1003;                            {  "mailslots"  }
  96.     kPrefMailAttrTypeNum        = 1004;                            {  "pref mailslot"  }
  97.     kAddressAttrTypeNum            = 1005;                            {  "Address"  }
  98.     kPictureAttrTypeNum            = 1006;                            {  "Picture"  }
  99.     kAuthKeyAttrTypeNum            = 1007;                            {  "auth key"  }
  100.     kTelephoneAttrTypeNum        = 1008;                            {  "Telephone"  }
  101.     kNBPNameAttrTypeNum            = 1009;                            {  "NBP Name"  }
  102.     kQMappingAttrTypeNum        = 1010;                            {  "ForwarderQMap"  }
  103.     kDialupSlotAttrTypeNum        = 1011;                            {  "DialupSlotInfo"  }
  104.     kHomeNetAttrTypeNum            = 1012;                            {  "Home Internet"  }
  105.     kCoResAttrTypeNum            = 1013;                            {  "Co-resident M&M"  }
  106.     kFwdrLocalAttrTypeNum        = 1014;                            {  "FwdrLocalRecord"  }
  107.     kConnectAttrTypeNum            = 1015;                            {  "Connected To"  }
  108.     kForeignAttrTypeNum            = 1016;                            {  "Foreign RLIs"  }
  109.     kOwnersAttrTypeNum            = 1017;                            {  "Owners"  }
  110.     kReadListAttrTypeNum        = 1018;                            {  "ReadList"  }
  111.     kWriteListAttrTypeNum        = 1019;                            {  "WriteList"  }
  112.     kDescriptorAttrTypeNum        = 1020;                            {  "Descriptor"  }
  113.     kCertificateAttrTypeNum        = 1021;                            {  "Certificate"  }
  114.     kMsgQsAttrTypeNum            = 1022;                            {  "MessageQs"  }
  115.     kPrefMsgQAttrTypeNum        = 1023;                            {  "PrefMessageQ"  }
  116.     kMasterPFAttrTypeNum        = 1024;                            {  "MasterPF"  }
  117.     kMasterNetSpecAttrTypeNum    = 1025;                            {  "MasterNetSpec"  }
  118.     kServersOfAttrTypeNum        = 1026;                            {  "Servers Of"  }
  119.     kParentCIDAttrTypeNum        = 1027;                            {  "Parent CID"  }
  120.     kNetworkSpecAttrTypeNum        = 1028;                            {  "NetworkSpec"  }
  121.     kLocationAttrTypeNum        = 1029;                            {  "Location"  }
  122.     kTimeSvrTypeAttrTypeNum        = 1030;                            {  "TimeServer Type"  }
  123.     kUpdateTimerAttrTypeNum        = 1031;                            {  "Update Timer"  }
  124.     kShadowsOfAttrTypeNum        = 1032;                            {  "Shadows Of"  }
  125.     kShadowServerAttrTypeNum    = 1033;                            {  "Shadow Server"  }
  126.     kTBSetupAttrTypeNum            = 1034;                            {  "TB Setup"  }
  127.     kMailSetupAttrTypeNum        = 1035;                            {  "Mail Setup"  }
  128.     kSlotIDAttrTypeNum            = 1036;                            {  "SlotID"  }
  129.     kGatewayFileIDAttrTypeNum    = 1037;                            {  "Gateway FileID"  }
  130.     kMailServiceAttrTypeNum        = 1038;                            {  "Mail Service"  }
  131.     kStdSlotInfoAttrTypeNum        = 1039;                            {  "Std Slot Info"  }
  132.     kAssoDirectoryAttrTypeNum    = 1040;                            {  "Asso. Directory"  }
  133.     kDirectoryAttrTypeNum        = 1041;                            {  "Directory"  }
  134.     kDirectoriesAttrTypeNum        = 1042;                            {  "Directories"  }
  135.     kSFlagsAttrTypeNum            = 1043;                            {  "SFlags"  }
  136.     kLocalNameAttrTypeNum        = 1044;                            {  "Local Name"  }
  137.     kLocalKeyAttrTypeNum        = 1045;                            {  "Local Key"  }
  138.     kDirUserRIDAttrTypeNum        = 1046;                            {  "Dir User RID"  }
  139.     kDirUserKeyAttrTypeNum        = 1047;                            {  "Dir User Key"  }
  140.     kDirNativeNameAttrTypeNum    = 1048;                            {  "Dir Native Name"  }
  141.     kCommentAttrTypeNum            = 1049;                            {  "Comment"  }
  142.     kRealNameAttrTypeNum        = 1050;                            {  "Real Name"  }
  143.     kPrivateDataAttrTypeNum        = 1051;                            {  "Private Data"  }
  144.     kDirTypeAttrTypeNum            = 1052;                            {  "Directory Type"  }
  145.     kDSAMFileAliasAttrTypeNum    = 1053;                            {  "DSAM File Alias"  }
  146.     kCanAddressToAttrTypeNum    = 1054;                            {  "Can Address To"  }
  147.     kDiscriminatorAttrTypeNum    = 1055;                            {  "Discriminator"  }
  148.     kAliasAttrTypeNum            = 1056;                            {  "Alias"  }
  149.     kParentMSAMAttrTypeNum        = 1057;                            {  "Parent MSAM"  }
  150.     kParentDSAMAttrTypeNum        = 1058;                            {  "Parent DSAM"  }
  151.     kSlotAttrTypeNum            = 1059;                            {  "Slot"  }
  152.     kAssoMailServiceAttrTypeNum    = 1060;                            {  "Asso. Mail Service"  }
  153.     kFakeAttrTypeNum            = 1061;                            {  "Fake"  }
  154.     kInheritSysAdminAttrTypeNum    = 1062;                            {  "Inherit SysAdministrators"  }
  155.     kPreferredPDAttrTypeNum        = 1063;                            {  "Preferred PD"  }
  156.     kLastLoginAttrTypeNum        = 1064;                            {  "Last Login"  }
  157.     kMailerAOMStateAttrTypeNum    = 1065;                            {  "Mailer AOM State"  }
  158.     kMailerSendOptionsAttrTypeNum = 1066;                        {  "Mailer Send Options"  }
  159.     kJoinedAttrTypeNum            = 1067;                            {  "Joined"  }
  160.     kUnconfiguredAttrTypeNum    = 1068;                            {  "Unconfigured"  }
  161.     kVersionAttrTypeNum            = 1069;                            {  "Version"  }
  162.     kLocationNamesAttrTypeNum    = 1070;                            {  "Location Names"  }
  163.     kActiveAttrTypeNum            = 1071;                            {  "Active"  }
  164.     kDeleteRequestedAttrTypeNum    = 1072;                            {  "Delete Requested"  }
  165.     kGatewayTypeAttrTypeNum        = 1073;                            {  "Gateway Type"  }
  166.     kFirstOCEAttrTypeNum        = 1001;                            {  first standard OCE attr type  }
  167.     kLastOCEAttrTypeNum            = 1073;                            {  last standard OCE attr type  }
  168.     kNumOCEAttrTypes            = 73;
  169.  
  170.  
  171. { Miscellaneous enums: }
  172.     kRString32Size                = 32;                            {  max size of the body field in RString32  }
  173.     kRString64Size                = 64;                            {  max size of the body field in RString64  }
  174.     kNetworkSpecMaxBytes        = 32;                            {  max size of the body field in NetworkSpec  }
  175.     kPathNameMaxBytes            = 1024;                            {  max size of the data field in PackedPathName  }
  176.     kDirectoryNameMaxBytes        = 32;                            {  max size of the body field in DirectoryName  }
  177.     kAttributeTypeMaxBytes        = 32;                            {  max size of the body field in AttributeType  }
  178.     kAttrValueMaxBytes            = 65536;                        {  max size of any attribute value  }
  179.     kRStringMaxBytes            = 256;                            {  max size (in bytes) of the body field of a recordName or recordType  }
  180.     kRStringMaxChars            = 128;                            {  max size (in chars) of the body field of a recordName or recordType  }
  181.  
  182.     kNULLDNodeNumber            = 0;                            {  Special value meaning none specified  }
  183.     kRootDNodeNumber            = 2;                            {  DNodeNum corresponding to the root of the tree  }
  184.  
  185.  
  186. { This enum is used to select the kind of RString in calls such as OCERelRString,
  187. OCEEqualRString, and OCEValidRString.
  188.  
  189. eGenericSensitive and eGenericInsensitive are enumerators that can be used if you
  190. use RStrings for things other than what you see in this file.  If you want them to
  191. be compared in a case- and diacritical-sensitive manner (c ≠ C ≠ ç), use
  192. eGenericSensitive.  If you want them to be compared in a case- and diacritical-
  193. insensitive manner (c = C = ç), use eGenericInensitive.
  194. WARNING:  do not use eGenericSensitive and eGenericInsensitive with catalog
  195. names, entity names, pathname parts, entity types, network specs, or attribute
  196. types!  Don't assume that you know how they should be compared!!! }
  197.     kOCEDirName                    = 0;
  198.     kOCERecordOrDNodeName        = 1;
  199.     kOCERecordType                = 2;
  200.     kOCENetworkSpec                = 3;
  201.     kOCEAttrType                = 4;
  202.     kOCEGenericSensitive        = 5;
  203.     kOCEGenericInsensitive        = 6;
  204.  
  205.  
  206. TYPE
  207.     RStringKind                            = UInt16;
  208. { Values for the signature field in Discriminator }
  209.  
  210. CONST
  211.     kDirAllKinds                = 0;
  212.     kDirADAPKind                = 'adap';
  213.     kDirPersonalDirectoryKind    = 'pdir';
  214.     kDirDSAMKind                = 'dsam';
  215.  
  216.  
  217.  
  218. TYPE
  219.     OCEDirectoryKind                    = UInt32;
  220. { Values returned by GetDSSpecInfo() }
  221.  
  222. CONST
  223.     kOCEInvalidDSSpec            = $3F3F3F3F;                    {  '????' could not be determined  }
  224.     kOCEDirsRootDSSpec            = 'root';                        {  root of all catalogs ("Catalogs" icon)  }
  225.     kOCEDirectoryDSSpec            = 'dire';                        {  catalog  }
  226.     kOCEDNodeDSSpec                = 'dnod';                        {  d-node  }
  227.     kOCERecordDSSpec            = 'reco';                        {  record  }
  228.     kOCEentnDSSpec                = 'entn';                        {  extensionType is 'entn'  }
  229.     kOCENOTentnDSSpec            = 'not ';                        {  extensionType is not 'entn'  }
  230.  
  231.  
  232. { Values for AttributeTag }
  233.     typeRString                    = 'rstr';
  234.     typePackedDSSpec            = 'dspc';
  235.     typeBinary                    = 'bnry';
  236.  
  237.  
  238. { Bit flag corresponding to the canContainRecords bit.  Use it like this:
  239.     if (foo & kCanContainRecords)
  240.         then this dNode can contain records!
  241. kForeignNode is used to indicate nodes in the name hierarchy that correspond to
  242. foreign catalogs (meaning ADAP sees no clusters or DNodes beneath it, but
  243. mail routers might be able to route to clusters beneath it. }
  244.     kCanContainRecordsBit        = 0;
  245.     kForeignNodeBit                = 1;
  246.  
  247. { DirNodeKind }
  248.     kCanContainRecords            = $00000001;
  249.     kForeignNode                = $00000002;
  250.  
  251.  
  252. TYPE
  253.     DirNodeKind                            = UInt32;
  254.  
  255.  
  256. {*** Toolbox Control ***}
  257. { We will have a version number and attributes for toolboxes off the aa5e trap
  258. and the S&F server trap.
  259.  
  260. This includes the OCE toolbox and S&F Server.  [Note: the S&F server will
  261. change to ONLY service ServerGateway calls —it will then be necessary to run
  262. it co–resident with an OCE toolbox].
  263.  
  264. The high order word will represent the S&F Server version number.  The low
  265. order word will represent the OCE toolbox version number.  These will be zero
  266. until the component is up and running.  It is not possible to know these
  267. a–priori. Note: there will not be a seperate version numbers for each component
  268. in the OCE toolbox or S&F server.
  269.  
  270. The above is consistent with the standard System 7.0 usage of Gestalt.
  271.  
  272. The oce tb attribute gestaltOCETBPresent implies the existence of OCE on a
  273. machine.
  274.  
  275. The OCE TB attribute gestaltOCETBAvailable implies the availablity of OCE calls.
  276.  
  277. The attribute gestaltOCESFServerAvailable implies the availablity of OCE calls
  278. available through the S&F server. This are essentially the server gateway calls.
  279.  
  280. Any (future) remaining OCE attributes may not be established correctly until
  281. the attribute gestaltOCETBAvailable is set.
  282.  
  283. }
  284.  
  285. {    Constants used for Transitions. }
  286.  
  287. CONST
  288.     ATTransIPMStart                = 'ipms';
  289.     ATTransIPMShutdown            = 'ipmd';
  290.     ATTransDirStart                = 'dirs';
  291.     ATTransDirShutdown            = 'dird';
  292.     ATTransAuthStart            = 'auts';
  293.     ATTransAuthShutdown            = 'autd';
  294.     ATTransSFStart                = 's&fs';
  295.     ATTransSFShutdown            = 's&fd';
  296.  
  297.  
  298.  
  299. { Some definitions for time-related parameters: }
  300. { Interpreted as UTC seconds since 1/1/1904 }
  301.  
  302. TYPE
  303.     UTCTime                                = UInt32;
  304. { seconds EAST of Greenwich }
  305.     UTCOffset                            = LONGINT;
  306. { This is the same as the ScriptManager script. }
  307.     CharacterSet                        = INTEGER;
  308. {*** RString ***}
  309.  
  310. { struct RString is a maximum-sized structure.  Allocate one of these and it will
  311. hold any valid RString. }
  312.     RStringPtr = ^RString;
  313.     RString = RECORD
  314.         charSet:                CharacterSet;
  315.         dataLength:                UInt16;
  316.         body:                    PACKED ARRAY [0..255] OF Byte;            {  place for characters  }
  317.     END;
  318.  
  319. { struct ProtoRString is a minimum-sized structure.  Use this for a variable-length RString. }
  320.     ProtoRStringPtr = ^ProtoRString;
  321.     ProtoRString = RECORD
  322.         charSet:                CharacterSet;
  323.         dataLength:                UInt16;
  324.     END;
  325.  
  326.     RStringHandle                        = ^RStringPtr;
  327.     RString64Ptr = ^RString64;
  328.     RString64 = RECORD
  329.         charSet:                CharacterSet;
  330.         dataLength:                UInt16;
  331.         body:                    PACKED ARRAY [0..63] OF Byte;
  332.     END;
  333.  
  334.     RString32Ptr = ^RString32;
  335.     RString32 = RECORD
  336.         charSet:                CharacterSet;
  337.         dataLength:                UInt16;
  338.         body:                    PACKED ARRAY [0..31] OF Byte;
  339.     END;
  340.  
  341. { Standard definitions for the entity type field and attribute type
  342. have been moved to the end of the file. }
  343.  
  344. { Copies str1 to str2.  str2Length is the size of str2, excluding header.
  345. A memFull error will be returned if that is not as large as str1->dataLength. }
  346. FUNCTION OCECopyRString({CONST}VAR str1: RString; VAR str2: RString; str2Length: UInt16): OSErr;
  347.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  348.     INLINE $303C, $0308, $AA5C;
  349.     {$ENDC}
  350.  
  351. {    Make an RString from a C string.  If the c string is bigger than rStrLength,
  352. only rStrLength bytes will be copied. (rStrLength does not include the header size) }
  353. PROCEDURE OCECToRString(cStr: ConstCStringPtr; charSet: CharacterSet; VAR rStr: RString; rStrLength: UInt16);
  354.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  355.     INLINE $303C, $0339, $AA5C;
  356.     {$ENDC}
  357.  
  358. {    Make an RString from a Pascal string.  If the Pascal string is bigger than rStrLength,
  359. only rStrLength bytes will be copied. (rStrLength does not include the header size) }
  360. PROCEDURE OCEPToRString(pStr: Str255; charSet: CharacterSet; VAR rStr: RString; rStrLength: UInt16);
  361.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  362.     INLINE $303C, $033A, $AA5C;
  363.     {$ENDC}
  364.  
  365. {    Make a Pascal string from an RString.  It's up to you to check the char set of
  366. the RString, or if the length of the RString is greater than 255 (the Pascal string's
  367. length will simply be the lower byte of the RString's length).  The StringPtr that is
  368. returned will point directly into the RString (no memory will be allocated). }
  369. FUNCTION OCERToPString(rStr: RStringPtr): StringPtr;
  370.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  371.     INLINE $303C, $033B, $AA5C;
  372.     {$ENDC}
  373. {    Check the relative equality of two RStrings.  Determines if str1 is greater than,
  374. equal to, or less than str2.  Result types for OCERelRString are defined in <OSUtils.h>
  375. (same as for RelString). }
  376. FUNCTION OCERelRString(str1: UNIV Ptr; str2: UNIV Ptr; kind: RStringKind): INTEGER;
  377.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  378.     INLINE $303C, $032D, $AA5C;
  379.     {$ENDC}
  380.  
  381. {    Check for equality of two RStrings. Returns true if equal. }
  382. FUNCTION OCEEqualRString(str1: UNIV Ptr; str2: UNIV Ptr; kind: RStringKind): BOOLEAN;
  383.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  384.     INLINE $303C, $0316, $AA5C;
  385.     {$ENDC}
  386.  
  387. {    Check the validity of an RString.  Returns true if the RString is valid }
  388. FUNCTION OCEValidRString(str: UNIV Ptr; kind: RStringKind): BOOLEAN;
  389.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  390.     INLINE $303C, $0338, $AA5C;
  391.     {$ENDC}
  392.  
  393. {*** CreationID ***}
  394.  
  395. TYPE
  396.     CreationIDPtr = ^CreationID;
  397.     CreationID = RECORD
  398.         source:                    UInt32;                                    {  Fields definitions and usage are not defined  }
  399.         seq:                    UInt32;
  400.     END;
  401.  
  402.     AttributeCreationID                    = CreationID;
  403.     AttributeCreationIDPtr                 = ^AttributeCreationID;
  404.  
  405. { Returns a pointer to a null CreationID . }
  406. FUNCTION OCENullCID: CreationIDPtr;
  407.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  408.     INLINE $303C, $0344, $AA5C;
  409.     {$ENDC}
  410.  
  411. { Returns a pointer to a special CreationID used within the PathFinder. }
  412. FUNCTION OCEPathFinderCID: CreationIDPtr;
  413.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  414.     INLINE $303C, $033C, $AA5C;
  415.     {$ENDC}
  416.  
  417. { Sets the CreationID to a null value. }
  418. PROCEDURE OCESetCreationIDtoNull(VAR cid: CreationID);
  419.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  420.     INLINE $303C, $032E, $AA5C;
  421.     {$ENDC}
  422.  
  423. { Copies the value of cid1 to cid2. }
  424. PROCEDURE OCECopyCreationID({CONST}VAR cid1: CreationID; VAR cid2: CreationID);
  425.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  426.     INLINE $303C, $0300, $AA5C;
  427.     {$ENDC}
  428.  
  429. { Check the equality of two CreationIDs. }
  430. FUNCTION OCEEqualCreationID({CONST}VAR cid1: CreationID; {CONST}VAR cid2: CreationID): BOOLEAN;
  431.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  432.     INLINE $303C, $030C, $AA5C;
  433.     {$ENDC}
  434.  
  435. {*** NetworkSpec ***}
  436. { For the record, a NetworkSpec is an RString with a smaller maximum size.
  437. I don't just typedef it to an RString, because I want the definition of the NetworkSpec
  438. struct to contain the max length.  But it should be possible to typecast any
  439. NetworkSpec to an RString and use all the RString utilities on it. }
  440.  
  441. TYPE
  442.     NetworkSpecPtr = ^NetworkSpec;
  443.     NetworkSpec = RECORD
  444.         charSet:                CharacterSet;
  445.         dataLength:                UInt16;
  446.         body:                    PACKED ARRAY [0..31] OF Byte;            {  always fixed at the max size  }
  447.     END;
  448.  
  449.  
  450. {*** PackedPathName ***}
  451. { struct PackedPathName is a maximum-sized structure.  Allocate one of
  452. these and it will hold any valid packed pathname. }
  453.     PackedPathNamePtr = ^PackedPathName;
  454.     PackedPathName = RECORD
  455.         dataLength:                UInt16;                                    {  dataLength excludes the space for the dataLength field  }
  456.         data:                    PACKED ARRAY [0..1021] OF Byte;
  457.     END;
  458.  
  459. { struct ProtoPackedPathName is a minimum-sized structure.  Use this
  460. for a variable-length packed PathName. }
  461.     ProtoPackedPathNamePtr = ^ProtoPackedPathName;
  462.     ProtoPackedPathName = RECORD
  463.         dataLength:                UInt16;                                    {  dataLength excludes the space for the dataLength field  }
  464.                                                                         {  Followed by data  }
  465.     END;
  466.  
  467. {
  468. Copy the contents of path1 to path2.  path2Length is the size of path2, and must
  469. be large enough to hold a copy of path1.  A memFull error will be returned if that
  470. is not the case.
  471. }
  472. FUNCTION OCECopyPackedPathName({CONST}VAR path1: PackedPathName; VAR path2: PackedPathName; path2Length: UInt16): OSErr;
  473.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  474.     INLINE $303C, $0304, $AA5C;
  475.     {$ENDC}
  476.  
  477. {
  478. Returns true if packed path pointer is nil, or is of zero length, or is of
  479. length 2 and nParts of zero.
  480. }
  481. FUNCTION OCEIsNullPackedPathName({CONST}VAR path: PackedPathName): BOOLEAN;
  482.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  483.     INLINE $303C, $031D, $AA5C;
  484.     {$ENDC}
  485.  
  486. {
  487. OCEUnpackPathName breaks apart the path into its component RStrings, writing string
  488. pointers into the array 'parts', which the client asserts can hold as many as
  489. 'nParts' elements. The number of parts actually found is returned.  Strings are
  490. placed in the array in order from lowest to highest.  The first pathName element
  491. beneath the root appears last.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO
  492. THE PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  493. WITH THE UNPACKED STRUCT AS WELL
  494. }
  495. FUNCTION OCEUnpackPathName({CONST}VAR path: PackedPathName; VAR parts: RStringPtr; nParts: UInt16): UInt16;
  496.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  497.     INLINE $303C, $0330, $AA5C;
  498.     {$ENDC}
  499. {
  500. OCEPackedPathNameSize computes the number of bytes of memory needed to hold a
  501. PackedPathName manufactured from the array of parts.  This length
  502. includes the length of the length field of PackedPathName, so it
  503. is safe to do a NewPtr (OCEPackedPathNameSize(...)).
  504. }
  505. FUNCTION OCEPackedPathNameSize({CONST}VAR parts: RStringPtr; nParts: UInt16): UInt16;
  506.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  507.     INLINE $303C, $0328, $AA5C;
  508.     {$ENDC}
  509. { OCEDNodeNameCount returns the number of RStrings contained within the path. }
  510. FUNCTION OCEDNodeNameCount({CONST}VAR path: PackedPathName): UInt16;
  511.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  512.     INLINE $303C, $032C, $AA5C;
  513.     {$ENDC}
  514.  
  515. {
  516. OCEPackPathName packs the parts into the storage provided as 'path'.  path must be
  517. large enough to hold the packed pathname.  A memFull error will be returned if
  518. pathLength is too small.  parts[0] should contain the deepest pathName element,
  519. and parts[nParts - 1] should contain the name of the first pathName element beneath
  520. the root. 
  521. }
  522. FUNCTION OCEPackPathName(VAR parts: RStringPtr; nParts: UInt16; VAR path: PackedPathName; pathLength: UInt16): OSErr;
  523.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  524.     INLINE $303C, $0323, $AA5C;
  525.     {$ENDC}
  526. {
  527. Check the equality of two packed paths.
  528. }
  529. FUNCTION OCEEqualPackedPathName({CONST}VAR path1: PackedPathName; {CONST}VAR path2: PackedPathName): BOOLEAN;
  530.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  531.     INLINE $303C, $0311, $AA5C;
  532.     {$ENDC}
  533.  
  534. {
  535. OCEValidPackedPathName checks that the packed PathName is internally consistent.
  536. Returns true if it's ok.
  537. }
  538. FUNCTION OCEValidPackedPathName({CONST}VAR path: PackedPathName): BOOLEAN;
  539.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  540.     INLINE $303C, $0334, $AA5C;
  541.     {$ENDC}
  542.  
  543. {*** DirDiscriminator ***}
  544.  
  545. TYPE
  546.     DirDiscriminatorPtr = ^DirDiscriminator;
  547.     DirDiscriminator = RECORD
  548.         signature:                OCEDirectoryKind;
  549.         misc:                    UInt32;
  550.     END;
  551.  
  552. { Copies the value of disc1 to disc2. }
  553. PROCEDURE OCECopyDirDiscriminator({CONST}VAR disc1: DirDiscriminator; VAR disc2: DirDiscriminator);
  554.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  555.     INLINE $303C, $0301, $AA5C;
  556.     {$ENDC}
  557.  
  558. { Check the equality of two DirDiscriminators. }
  559. FUNCTION OCEEqualDirDiscriminator({CONST}VAR disc1: DirDiscriminator; {CONST}VAR disc2: DirDiscriminator): BOOLEAN;
  560.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  561.     INLINE $303C, $030D, $AA5C;
  562.     {$ENDC}
  563. {
  564. This structure is called RLI because it really contains all the info you
  565. need to locate a record within the entire name space.  It contains four fields.
  566. The first two are the name of the catalog and a catalog discriminator.  These
  567. two fields are used to indicate to which catalog a given record belongs.  The
  568. discriminator is used to distinguish between two different catalogs that have
  569. the same name.
  570.  
  571. The other two fields in the RLI structure are used to indicate a particular
  572. catalog node within the catalog specified by the directoryName and
  573. discriminator fields.  These fields are exactly analagous to the dirID and
  574. pathname used in HFS.  It is possible to specify a dNode just by dNodeNumber
  575. (pathname is nil), or just by pathname (dNodeNumber is set to kNULLDNodeNumber),
  576. or by a combination of the two.  The latter is called a 'partial pathname', and
  577. while it is valid in the Catalog Manager API, it is not supported by ADAP
  578. catalogs in Release 1.
  579.  
  580. Note that the path parameter does not include the catalog name, but holds
  581. the names of all the nodes on the path to the desired catalog node, starting
  582. with the catalog node and working its way up the tree.
  583. }
  584.  
  585. {*** RLI ***}
  586.  
  587.  
  588. TYPE
  589.     DirectoryNamePtr = ^DirectoryName;
  590.     DirectoryName = RECORD
  591.         charSet:                CharacterSet;
  592.         dataLength:                UInt16;
  593.         body:                    PACKED ARRAY [0..31] OF Byte;            {  space for catalog name  }
  594.     END;
  595.  
  596. { Catalog node number }
  597.     DNodeNum                            = UInt32;
  598.     RLIPtr = ^RLI;
  599.     RLI = RECORD
  600.         directoryName:            DirectoryNamePtr;                        {  pointer to the name of the catalog root  }
  601.         discriminator:            DirDiscriminator;                        {  used to discriminate between dup catalog names  }
  602.         dNodeNumber:            DNodeNum;                                {  number of the node  }
  603.         path:                    PackedPathNamePtr;                        {  old-style RLI  }
  604.     END;
  605.  
  606. {
  607. Create a new RLI from the catalog name, discriminator, DNode number, and
  608. PackedPathName.  You must allocate the storage for the RLI and pass in a pointer
  609. to it.
  610. }
  611. PROCEDURE OCENewRLI(VAR newRLI: RLI; {CONST}VAR dirName: DirectoryName; VAR discriminator: DirDiscriminator; dNodeNumber: DNodeNum; {CONST}VAR path: PackedPathName);
  612.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  613.     INLINE $303C, $031F, $AA5C;
  614.     {$ENDC}
  615.  
  616. {
  617. Duplicate the contents of rli1 to rli2.  No errors are returned. This
  618. simply copies the pointers to the catalog name and path, wiping out any pointer
  619. that you might have had in there.
  620. }
  621. PROCEDURE OCEDuplicateRLI({CONST}VAR rli1: RLI; VAR rli2: RLI);
  622.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  623.     INLINE $303C, $030B, $AA5C;
  624.     {$ENDC}
  625.  
  626. {
  627. Copy the contents of rli1 to rli2.  rli2 must already contain
  628. pointers to structures large enough to hold copies of the corresponding
  629. fields from rli1.  A memFull error will be returned if that is not the case.
  630. So if you allocate a brand new empty destination, you must at least set up
  631. its length fields.
  632. }
  633. FUNCTION OCECopyRLI({CONST}VAR rli1: RLI; VAR rli2: RLI): OSErr;
  634.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  635.     INLINE $303C, $0307, $AA5C;
  636.     {$ENDC}
  637.  
  638. {
  639. Check the equality of two RLIs.  This will take into account differences
  640. in the case and diacriticals of the directoryName and the PathName.
  641. NOTE THAT THIS WILL FAIL IF rli1 CONTAINS A DNODENUMBER AND A NIL PATHNAME,
  642. AND rli2 CONTAINS kNULLDNodeNumber AND A NON-NIL PATHNAME.  IN OTHER WORDS,
  643. THE TWO rlis MUST BE OF THE SAME FORM TO CHECK FOR EQUALITY.
  644. The one exception is that if the pathname is nil, a dNodeNumber of zero and
  645. kRootDNodeNumber will be treated as equal.
  646. }
  647. FUNCTION OCEEqualRLI({CONST}VAR rli1: RLI; {CONST}VAR rli2: RLI): BOOLEAN;
  648.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  649.     INLINE $303C, $0315, $AA5C;
  650.     {$ENDC}
  651.  
  652. {
  653. Check the validity of an RLI.  This checks that the catalog name length
  654. is within bounds, and the packed pathname (if specified) is valid.
  655. }
  656. FUNCTION OCEValidRLI({CONST}VAR theRLI: RLI): BOOLEAN;
  657.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  658.     INLINE $303C, $0337, $AA5C;
  659.     {$ENDC}
  660. {*** PackedRLI ***}
  661. {
  662. struct PackedRLI is a maximum-sized structure.  Allocate one of
  663. these and it will hold any valid packed pathname.
  664. }
  665.  
  666. CONST
  667.     kRLIMaxBytes                = 1296;
  668.  
  669.  
  670. TYPE
  671.     PackedRLIPtr = ^PackedRLI;
  672.     PackedRLI = RECORD
  673.         dataLength:                UInt16;                                    {  dataLength excludes the space for the dataLength field  }
  674.         data:                    PACKED ARRAY [0..1295] OF Byte;
  675.     END;
  676.  
  677. {
  678. struct ProtoPackedRLI is a minimum-sized structure.  Use this
  679. for a variable-length packed RLI.
  680. }
  681.     ProtoPackedRLIPtr = ^ProtoPackedRLI;
  682.     ProtoPackedRLI = RECORD
  683.         dataLength:                UInt16;                                    {  dataLength excludes the space for the dataLength field  }
  684.                                                                         {  Followed by data  }
  685.     END;
  686.  
  687. {
  688. Copy the contents of prli1 to prli2.  prli2Length is the size of prli2, and must
  689. be large enough to hold a copy of prli1.  A memFull error will be returned if that
  690. is not the case.
  691. }
  692. FUNCTION OCECopyPackedRLI({CONST}VAR prli1: PackedRLI; VAR prli2: PackedRLI; prli2Length: UInt16): OSErr;
  693.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  694.     INLINE $303C, $0305, $AA5C;
  695.     {$ENDC}
  696.  
  697. {
  698. OCEUnpackRLI breaks apart the prli into its components, writing pointers into
  699. the rli structure.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE
  700. PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  701. WITH THE UNPACKED STRUCT AS WELL
  702. }
  703. PROCEDURE OCEUnpackRLI({CONST}VAR prli: PackedRLI; VAR theRLI: RLI);
  704.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  705.     INLINE $303C, $0331, $AA5C;
  706.     {$ENDC}
  707.  
  708. {
  709. OCEPackedRLISize computes the number of bytes of memory needed to hold a
  710. PackedRLI manufactured from an RLI.  This length
  711. includes the length of the length field of PackedRLI, so it
  712. is safe to do a NewPtr (OCEPackedRLISize(...)).
  713. }
  714. FUNCTION OCEPackedRLISize({CONST}VAR theRLI: RLI): UInt16;
  715.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  716.     INLINE $303C, $032A, $AA5C;
  717.     {$ENDC}
  718.  
  719. {
  720. OCEPackRLI packs the RLI into the storage provided as 'prli'.  prli must be
  721. large enough to hold the packed RLI.  A memFull error will be returned if
  722. prliLength is too small.
  723. }
  724. FUNCTION OCEPackRLI({CONST}VAR theRLI: RLI; VAR prli: PackedRLI; prliLength: UInt16): OSErr;
  725.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  726.     INLINE $303C, $0324, $AA5C;
  727.     {$ENDC}
  728.  
  729. {
  730. OCEPackedRLIPartsSize computes the number of bytes of memory needed to hold a
  731. PackedRLI manufactured from the parts of an RLI.  This length
  732. includes the length of the length field of PackedRLI, so it
  733. is safe to do a NewPtr (OCEPackedRLIPartsSize(...)).
  734. }
  735. FUNCTION OCEPackedRLIPartsSize({CONST}VAR dirName: DirectoryName; VAR parts: RStringPtr; nParts: UInt16): UInt16;
  736.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  737.     INLINE $303C, $0329, $AA5C;
  738.     {$ENDC}
  739. {
  740. OCEPackRLIParts packs the parts of an RLI into the storage provided as 'prli'.
  741. prli must be large enough to hold the packed RLI.  A memFull error will be returned
  742. if prliLength is too small.
  743. }
  744. FUNCTION OCEPackRLIParts({CONST}VAR dirName: DirectoryName; {CONST}VAR discriminator: DirDiscriminator; dNodeNumber: DNodeNum; VAR parts: RStringPtr; nParts: UInt16; VAR prli: PackedRLI; prliLength: UInt16): OSErr;
  745.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  746.     INLINE $303C, $0325, $AA5C;
  747.     {$ENDC}
  748. {
  749. Check the equality of two packed prlis.
  750. }
  751. FUNCTION OCEEqualPackedRLI({CONST}VAR prli1: PackedRLI; {CONST}VAR prli2: PackedRLI): BOOLEAN;
  752.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  753.     INLINE $303C, $0313, $AA5C;
  754.     {$ENDC}
  755.  
  756. {
  757. Check the validity of a packed RLI.  This checks that the catalog name length
  758. is within bounds, and the packed pathname (if specified) is valid.
  759. }
  760. FUNCTION OCEValidPackedRLI({CONST}VAR prli: PackedRLI): BOOLEAN;
  761.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  762.     INLINE $303C, $0336, $AA5C;
  763.     {$ENDC}
  764. {
  765. If this packed RLI describes a Personal Catalog, this call will return a pointer
  766. to an alias record that can be used to find the actual file.  Otherwise, it returns nil.
  767. }
  768. FUNCTION OCEExtractAlias({CONST}VAR prli: PackedRLI): AliasPtr;
  769.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  770.     INLINE $303C, $0318, $AA5C;
  771.     {$ENDC}
  772. {
  773. This call returns a pointer to a packed RLI that represents the "Catalogs" icon, or
  774. the root of all catalogs.  It is used in the CollabPack.
  775. }
  776. FUNCTION OCEGetDirectoryRootPackedRLI: PackedRLIPtr;
  777.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  778.     INLINE $303C, $0346, $AA5C;
  779.     {$ENDC}
  780. {*** LocalRecordID ***}
  781.  
  782. TYPE
  783.     LocalRecordIDPtr = ^LocalRecordID;
  784.     LocalRecordID = RECORD
  785.         cid:                    CreationID;
  786.         recordName:                RStringPtr;
  787.         recordType:                RStringPtr;
  788.     END;
  789.  
  790. { Create a LocalRecordID from a name, type, and CreationID }
  791. PROCEDURE OCENewLocalRecordID({CONST}VAR recordName: RString; {CONST}VAR recordType: RString; {CONST}VAR cid: CreationID; VAR lRID: LocalRecordID);
  792.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  793.     INLINE $303C, $031E, $AA5C;
  794.     {$ENDC}
  795. {
  796. Copy LocalRecordID lRID1 to LocalRecordID lRID2.  lRID2 must already contain
  797. pointers to RString structures large enough to hold copies of the corresponding
  798. fields from lRID1.  A memFull error will be returned if that is not the case.
  799. So if you allocate a brand new empty destination, you must at least set up
  800. its length field.
  801. }
  802. FUNCTION OCECopyLocalRecordID({CONST}VAR lRID1: LocalRecordID; VAR lRID2: LocalRecordID): OSErr;
  803.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  804.     INLINE $303C, $0302, $AA5C;
  805.     {$ENDC}
  806.  
  807. {
  808. Check the equality of two local RIDs.
  809. }
  810. FUNCTION OCEEqualLocalRecordID({CONST}VAR lRID1: LocalRecordID; {CONST}VAR lRID2: LocalRecordID): BOOLEAN;
  811.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  812.     INLINE $303C, $030F, $AA5C;
  813.     {$ENDC}
  814. {*** ShortRecordID ***}
  815.  
  816. TYPE
  817.     ShortRecordIDPtr = ^ShortRecordID;
  818.     ShortRecordID = RECORD
  819.         rli:                    PackedRLIPtr;
  820.         cid:                    CreationID;
  821.     END;
  822.  
  823. { Create a ShortRecordID from an RLI struct and a CreationID }
  824. PROCEDURE OCENewShortRecordID({CONST}VAR theRLI: PackedRLI; {CONST}VAR cid: CreationID; sRID: ShortRecordIDPtr);
  825.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  826.     INLINE $303C, $0321, $AA5C;
  827.     {$ENDC}
  828.  
  829. {
  830. Copy ShortRecordID sRID1 to ShortRecordID sRID2.  sRID2 must already contain
  831. pointers to structures large enough to hold copies of the corresponding
  832. fields from sRID1.  A memFull error will be returned if that is not the case.
  833. So if you allocate a brand new empty destination, you must at least set up
  834. its length fields.
  835. }
  836. FUNCTION OCECopyShortRecordID({CONST}VAR sRID1: ShortRecordID; VAR sRID2: ShortRecordID): OSErr;
  837.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  838.     INLINE $303C, $030A, $AA5C;
  839.     {$ENDC}
  840.  
  841. {
  842. Check the equality of two short RIDs.
  843. }
  844. FUNCTION OCEEqualShortRecordID({CONST}VAR sRID1: ShortRecordID; {CONST}VAR sRID2: ShortRecordID): BOOLEAN;
  845.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  846.     INLINE $303C, $0317, $AA5C;
  847.     {$ENDC}
  848. {*** RecordID ***}
  849.  
  850. TYPE
  851.     RecordIDPtr = ^RecordID;
  852.     RecordID = RECORD
  853.         rli:                    PackedRLIPtr;                            {  pointer to a packed rli structure  }
  854.         local:                    LocalRecordID;
  855.     END;
  856.  
  857. {    Create a RecordID from a packed RLI struct and a LocalRecordID.
  858. This doesn't allocate any new space; the RecordID points to the same
  859. packed RLI struct and the same name and type RStrings. }
  860. PROCEDURE OCENewRecordID({CONST}VAR theRLI: PackedRLI; {CONST}VAR lRID: LocalRecordID; VAR rid: RecordID);
  861.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  862.     INLINE $303C, $0320, $AA5C;
  863.     {$ENDC}
  864.  
  865. {
  866. Copy RecordID RID1 to RecordID RID2.  RID2 must already contain
  867. pointers to structures large enough to hold copies of the corresponding
  868. fields from lRID1.  A memFull error will be returned if that is not the case.
  869. So if you allocate a brand new empty destination, you must at least set up
  870. its length fields.
  871. }
  872. FUNCTION OCECopyRecordID({CONST}VAR rid1: RecordID; {CONST}VAR rid2: RecordID): OSErr;
  873.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  874.     INLINE $303C, $0309, $AA5C;
  875.     {$ENDC}
  876.  
  877. {    Check the equality of two RIDs. }
  878. FUNCTION OCEEqualRecordID({CONST}VAR rid1: RecordID; {CONST}VAR rid2: RecordID): BOOLEAN;
  879.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  880.     INLINE $303C, $0314, $AA5C;
  881.     {$ENDC}
  882.  
  883. {*** PackedRecordID ***}
  884. {
  885. struct PackedRecordID is a maximum-sized structure.  Allocate one of
  886. these and it will hold any valid packed RecordID.
  887. }
  888.  
  889. CONST
  890.     kPackedRecordIDMaxBytes        = 1824;
  891.  
  892.  
  893. TYPE
  894.     PackedRecordIDPtr = ^PackedRecordID;
  895.     PackedRecordID = RECORD
  896.         dataLength:                UInt16;                                    {  dataLength excludes the space for the dataLength field  }
  897.         data:                    PACKED ARRAY [0..1823] OF Byte;
  898.     END;
  899.  
  900. {
  901. struct ProtoPackedRecordID is a minimum-sized structure.  Use this
  902. for a variable-length packed RecordID.
  903. }
  904.     ProtoPackedRecordIDPtr = ^ProtoPackedRecordID;
  905.     ProtoPackedRecordID = RECORD
  906.         dataLength:                UInt16;                                    {  dataLength excludes the space for the dataLength field  }
  907.                                                                         {  Followed by data  }
  908.     END;
  909.  
  910. {
  911. Copy PackedRecordID pRID1 to PackedRecordID pRID2.  pRID2 must already contain
  912. pointers to structures large enough to hold copies of the corresponding
  913. fields from pRID1.  A memFull error will be returned if that is not the case.
  914. pRID2Length is the number of bytes that can be put into pRID2, not counting the
  915. packed RecordID header.
  916. }
  917. FUNCTION OCECopyPackedRecordID({CONST}VAR pRID1: PackedRecordID; {CONST}VAR pRID2: PackedRecordID; pRID2Length: UInt16): OSErr;
  918.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  919.     INLINE $303C, $0306, $AA5C;
  920.     {$ENDC}
  921.  
  922. {
  923. Create a RecordID from a PackedRecordID.
  924. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  925. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL
  926. }
  927. PROCEDURE OCEUnpackRecordID({CONST}VAR pRID: PackedRecordID; VAR rid: RecordID);
  928.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  929.     INLINE $303C, $0332, $AA5C;
  930.     {$ENDC}
  931.  
  932. {
  933. Create a PackedRecordID from a RecordID.  pRID must be large enough to contain
  934. the packed RecordID.  A memFull error will be returned if that is not the case.
  935. packedRecordIDLength is the number of bytes that can be put into pRID, not
  936. counting the header.
  937. }
  938. FUNCTION OCEPackRecordID({CONST}VAR rid: RecordID; VAR pRID: PackedRecordID; packedRecordIDLength: UInt16): OSErr;
  939.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  940.     INLINE $303C, $0326, $AA5C;
  941.     {$ENDC}
  942.  
  943. {
  944. Compute the number of bytes of memory needed to hold a RecordID when packed. This
  945. length includes the length of the length field of PackedRecordID, so it
  946. is safe to do a NewPtr (OCEPackedRecordIDSize(...)).
  947. }
  948. FUNCTION OCEPackedRecordIDSize({CONST}VAR rid: RecordID): UInt16;
  949.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  950.     INLINE $303C, $032B, $AA5C;
  951.     {$ENDC}
  952.  
  953. {
  954. Check the equality of two packed RIDs.
  955. }
  956. FUNCTION OCEEqualPackedRecordID({CONST}VAR pRID1: PackedRecordID; {CONST}VAR pRID2: PackedRecordID): BOOLEAN;
  957.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  958.     INLINE $303C, $0312, $AA5C;
  959.     {$ENDC}
  960.  
  961. { OCEValidPackedRecordID checks the validity of a packed record ID. }
  962. FUNCTION OCEValidPackedRecordID({CONST}VAR pRID: PackedRecordID): BOOLEAN;
  963.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  964.     INLINE $303C, $0335, $AA5C;
  965.     {$ENDC}
  966.  
  967. {*** DSSpec ***}
  968.  
  969. TYPE
  970.     DSSpecPtr = ^DSSpec;
  971.     DSSpec = RECORD
  972.         entitySpecifier:        RecordIDPtr;
  973.         extensionType:            OSType;
  974.         extensionSize:            UInt16;
  975.         extensionValue:            Ptr;
  976.     END;
  977.  
  978. {
  979. struct PackedDSSpec is NOT a maximum-sized structure.  Allocate one of
  980. these and it will hold any valid packed RecordID, but not necessarily any additional
  981. data.
  982. }
  983.  
  984.  
  985. CONST
  986.     kPackedDSSpecMaxBytes        = 1832;
  987.  
  988.  
  989. TYPE
  990.     PackedDSSpecPtr = ^PackedDSSpec;
  991.     PackedDSSpec = RECORD
  992.         dataLength:                UInt16;                                    {  dataLength excludes the space for the dataLength field  }
  993.         data:                    PACKED ARRAY [0..1831] OF Byte;
  994.     END;
  995.  
  996.     PackedDSSpecHandle                    = ^PackedDSSpecPtr;
  997. {
  998. struct ProtoPackedDSSpec is a minimum-sized structure.  Use this
  999. for a variable-length packed DSSpec.
  1000. }
  1001.     ProtoPackedDSSpecPtr = ^ProtoPackedDSSpec;
  1002.     ProtoPackedDSSpec = RECORD
  1003.         dataLength:                UInt16;                                    {  dataLength excludes the space for the dataLength field  }
  1004.                                                                         {  Followed by data  }
  1005.     END;
  1006.  
  1007. {
  1008. Copy PackedDSSpec pdss1 to PackedDSSpec pdss2.  pdss2 must already contain
  1009. pointers to structures large enough to hold copies of the corresponding
  1010. fields from pdss1.  A memFull error will be returned if that is not the case.
  1011. pdss2Length is the number of bytes that can be put into pdss2, not counting the
  1012. packed DSSpec header.
  1013. }
  1014. FUNCTION OCECopyPackedDSSpec({CONST}VAR pdss1: PackedDSSpec; {CONST}VAR pdss2: PackedDSSpec; pdss2Length: UInt16): OSErr;
  1015.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1016.     INLINE $303C, $0303, $AA5C;
  1017.     {$ENDC}
  1018.  
  1019. {
  1020. Create a DSSpec from a PackedDSSpec.
  1021. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1022. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL.
  1023. A pointer to the extension is returned in dss->extensionValue, and the length of that
  1024. extension is returned in dss->extensionSize.  If there is no extension, dss->extensionValue will
  1025. be set to nil.  This routine will unpack the RecordID (if any) into rid, unpack the rest
  1026. into dss, and set dss->entitySpecifier to rid.
  1027. }
  1028. PROCEDURE OCEUnpackDSSpec({CONST}VAR pdss: PackedDSSpec; VAR dss: DSSpec; VAR rid: RecordID);
  1029.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1030.     INLINE $303C, $032F, $AA5C;
  1031.     {$ENDC}
  1032.  
  1033. {
  1034. Create a PackedDSSpec from a DSSpec.  pdss must be large enough to
  1035. contain the packed RecordID and any extension.  A memFull error will be returned if that
  1036. is not the case.  pdssLength is the number of bytes that can be put into pdss,
  1037. not counting the header.
  1038. }
  1039. FUNCTION OCEPackDSSpec({CONST}VAR dss: DSSpec; VAR pdss: PackedDSSpec; pdssLength: UInt16): OSErr;
  1040.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1041.     INLINE $303C, $0322, $AA5C;
  1042.     {$ENDC}
  1043.  
  1044. {
  1045. Compute the number of bytes of memory needed to hold a DSSpec when packed. This
  1046. length includes the length of the length field of PackedDSSpec, so it
  1047. is safe to do a NewPtr (OCEPackedDSSpecSize(...)).
  1048. }
  1049. FUNCTION OCEPackedDSSpecSize({CONST}VAR dss: DSSpec): UInt16;
  1050.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1051.     INLINE $303C, $0327, $AA5C;
  1052.     {$ENDC}
  1053.  
  1054. {    Check the equality of two DSSpecs.  This compares all fields, even the
  1055. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1056. diacrit-insensitive manner. }
  1057. FUNCTION OCEEqualDSSpec({CONST}VAR pdss1: DSSpec; {CONST}VAR pdss2: DSSpec): BOOLEAN;
  1058.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1059.     INLINE $303C, $030E, $AA5C;
  1060.     {$ENDC}
  1061.  
  1062. {    Check the equality of two PackedDSSpecs.  This compares all fields, even the
  1063. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1064. diacrit-insensitive manner. }
  1065. FUNCTION OCEEqualPackedDSSpec({CONST}VAR pdss1: PackedDSSpec; {CONST}VAR pdss2: PackedDSSpec): BOOLEAN;
  1066.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1067.     INLINE $303C, $0310, $AA5C;
  1068.     {$ENDC}
  1069.  
  1070. {
  1071. Check the validity of a PackedDSSpec.  If extensionType is
  1072. 'entn', pdss must contain a valid entitySpecifier.  For all other extensionTypes, a nil
  1073. entitySpecifier is valid, but if non-nil, it will be checked for validity.  No check
  1074. is made on the extension.
  1075. }
  1076. FUNCTION OCEValidPackedDSSpec({CONST}VAR pdss: PackedDSSpec): BOOLEAN;
  1077.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1078.     INLINE $303C, $0333, $AA5C;
  1079.     {$ENDC}
  1080.  
  1081. {
  1082. Return info about a DSSpec.  This routine does not check validity.  If the
  1083. DSSpec has no extension, we determine whether it represents the root of all
  1084. catalogs, a single catalog, a DNode, or a Record.  Else it is invalid.
  1085. If the DSSpec has an extension, we simply return the extension type.
  1086. }
  1087. FUNCTION OCEGetDSSpecInfo({CONST}VAR spec: DSSpec): LONGINT;
  1088.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1089.     INLINE $303C, $0319, $AA5C;
  1090.     {$ENDC}
  1091.  
  1092. { OCEGetExtensionType returns the extensionType imbedded in the PackedDSSpec. }
  1093. FUNCTION OCEGetExtensionType({CONST}VAR pdss: PackedDSSpec): LONGINT;
  1094.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1095.     INLINE $303C, $031C, $AA5C;
  1096.     {$ENDC}
  1097. {
  1098. OCEStreamPackedDSSpec streams (flattens) a catalog object a little at a time by
  1099. calling the DSSpecStreamer routine that you provide.
  1100. }
  1101.  
  1102. TYPE
  1103. {$IFC TYPED_FUNCTION_POINTERS}
  1104.     DSSpecStreamerProcPtr = FUNCTION(buffer: UNIV Ptr; count: UInt32; eof: BOOLEAN; userData: LONGINT): OSErr;
  1105. {$ELSEC}
  1106.     DSSpecStreamerProcPtr = ProcPtr;
  1107. {$ENDC}
  1108.  
  1109.     DSSpecStreamerUPP = UniversalProcPtr;
  1110.  
  1111. CONST
  1112.     uppDSSpecStreamerProcInfo = $000037E0;
  1113.  
  1114. FUNCTION NewDSSpecStreamerProc(userRoutine: DSSpecStreamerProcPtr): DSSpecStreamerUPP;
  1115.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1116.     INLINE $2E9F;
  1117.     {$ENDC}
  1118.  
  1119. FUNCTION CallDSSpecStreamerProc(buffer: UNIV Ptr; count: UInt32; eof: BOOLEAN; userData: LONGINT; userRoutine: DSSpecStreamerUPP): OSErr;
  1120.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1121.     INLINE $205F, $4E90;
  1122.     {$ENDC}
  1123.  
  1124. TYPE
  1125.     DSSpecStreamer                        = DSSpecStreamerUPP;
  1126. FUNCTION OCEStreamPackedDSSpec({CONST}VAR dss: DSSpec; stream: DSSpecStreamer; userData: LONGINT; VAR actualCount: UInt32): OSErr;
  1127.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1128.     INLINE $303C, $033D, $AA5C;
  1129.     {$ENDC}
  1130. {*** AttributeType ***}
  1131. {
  1132. For the record, an AttributeType is an RString with a smaller maximum size.
  1133. I don't just typedef it to an RString, because I want the definition of the AttributeType
  1134. struct to contain the max length, because I need to include it in the Attribute struct
  1135. below.  But it should be possible to typecast any AttributeType to an RString and use
  1136. all the RString utilities on it.
  1137. }
  1138.  
  1139. TYPE
  1140.     AttributeTypePtr = ^AttributeType;
  1141.     AttributeType = RECORD
  1142.         charSet:                CharacterSet;
  1143.         dataLength:                UInt16;
  1144.         body:                    PACKED ARRAY [0..31] OF Byte;            {  always fixed at the max size  }
  1145.     END;
  1146.  
  1147. { Miscellaneous defines:  (these cannot be made into enums) }
  1148.  
  1149. CONST
  1150.     kMinPackedRStringLength        = 4;
  1151.  
  1152.     kMinPackedRLISize            = 20;
  1153.  
  1154. {*** AttributeValue ***}
  1155. { same class as is used in AppleEvents }
  1156.  
  1157. TYPE
  1158.     AttributeTag                        = DescType;
  1159.     AttributeValuePtr = ^AttributeValue;
  1160.     AttributeValue = RECORD
  1161.         tag:                    AttributeTag;
  1162.         dataLength:                UInt32;
  1163.         bytes:                    Ptr;
  1164.     END;
  1165.  
  1166. {*** Attribute ***}
  1167.     AttributePtr = ^Attribute;
  1168.     Attribute = RECORD
  1169.         attributeType:            AttributeType;
  1170.         cid:                    AttributeCreationID;
  1171.         value:                    AttributeValue;
  1172.     END;
  1173.  
  1174. FUNCTION OCEGetIndRecordType(stringIndex: OCERecordTypeIndex): RStringPtr;
  1175.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1176.     INLINE $303C, $031B, $AA5C;
  1177.     {$ENDC}
  1178. FUNCTION OCEGetIndAttributeType(stringIndex: OCEAttributeTypeIndex): AttributeTypePtr;
  1179.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1180.     INLINE $303C, $031A, $AA5C;
  1181.     {$ENDC}
  1182.  
  1183. CONST
  1184.     _oceTBDispatch                = $AA5E;
  1185.  
  1186. {***************************************************************************************
  1187.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1188.  
  1189.    OCESizePackedRecipient, OCEPackRecipient, OCEUnpackRecipient, OCEStreamRecipient,
  1190.    OCEGetRecipientType, and OCESetRecipientType have moved to the OCE header file.
  1191.    The OCEMessaging header includes the OCE header, so no changes to your code are
  1192.    required.
  1193.  
  1194. ***************************************************************************************}
  1195.  
  1196. TYPE
  1197.     OCERecipient                        = DSSpec;
  1198.     OCERecipientPtr                     = ^OCERecipient;
  1199.  
  1200. CONST
  1201.     kOCESizePackedRecipient        = 830;
  1202.     kOCEPackRecipient            = 831;
  1203.     kOCEUnpackRecipient            = 832;
  1204.     kOCEStreamRecipient            = 833;
  1205.     kOCEGetRecipientType        = 834;
  1206.     kOCESetRecipientType        = 835;
  1207.  
  1208. {
  1209. Compute the space that a OCERecipient would take if it were in packed
  1210. form.  [Note: does NOT even pad extensionSize, so you may get an odd #back out]
  1211. Safe to pass dereferenced handle(s).
  1212. }
  1213. FUNCTION OCESizePackedRecipient({CONST}VAR rcpt: OCERecipient): UInt16;
  1214.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1215.     INLINE $303C, $033E, $AA5C;
  1216.     {$ENDC}
  1217.  
  1218. {
  1219. Take an OCERecipient (scatter) and (gather) stream into the specified
  1220. buffer.  It is assumed that there is sufficient space in the buffer (that is
  1221. OCESizePackedRecipient).  Safe to pass dereferenced handle(s).
  1222. }
  1223. FUNCTION OCEPackRecipient({CONST}VAR rcpt: OCERecipient; buffer: UNIV Ptr): UInt16;
  1224.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1225.     INLINE $303C, $033F, $AA5C;
  1226.     {$ENDC}
  1227. {
  1228. Take a packed OCERecipient and cast a the OCERecipient frame over it. Returns
  1229. amBadDestId if it doesn't look like an OCERecipient. Safe to pass dereferenced
  1230. handle(s).
  1231. }
  1232. FUNCTION OCEUnpackRecipient(buffer: UNIV Ptr; VAR rcpt: OCERecipient; VAR entitySpecifier: RecordID): OSErr;
  1233.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1234.     INLINE $303C, $0340, $AA5C;
  1235.     {$ENDC}
  1236. {
  1237. Take an OCERecipient (scatter) and (gather) stream using the specified
  1238. function.  Safe to pass dereferenced handle(s).  If streamer function returns
  1239. OCEError OCEStreamRecipient stops execution and passes the error back to the caller
  1240. }
  1241.  
  1242. TYPE
  1243. {$IFC TYPED_FUNCTION_POINTERS}
  1244.     OCERecipientStreamerProcPtr = FUNCTION(buffer: UNIV Ptr; count: UInt32; eof: BOOLEAN; userData: LONGINT): OSErr;
  1245. {$ELSEC}
  1246.     OCERecipientStreamerProcPtr = ProcPtr;
  1247. {$ENDC}
  1248.  
  1249.     OCERecipientStreamerUPP = UniversalProcPtr;
  1250.  
  1251. CONST
  1252.     uppOCERecipientStreamerProcInfo = $000037E0;
  1253.  
  1254. FUNCTION NewOCERecipientStreamerProc(userRoutine: OCERecipientStreamerProcPtr): OCERecipientStreamerUPP;
  1255.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1256.     INLINE $2E9F;
  1257.     {$ENDC}
  1258.  
  1259. FUNCTION CallOCERecipientStreamerProc(buffer: UNIV Ptr; count: UInt32; eof: BOOLEAN; userData: LONGINT; userRoutine: OCERecipientStreamerUPP): OSErr;
  1260.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1261.     INLINE $205F, $4E90;
  1262.     {$ENDC}
  1263.  
  1264. TYPE
  1265.     OCERecipientStreamer                = OCERecipientStreamerUPP;
  1266. FUNCTION OCEStreamRecipient({CONST}VAR rcpt: OCERecipient; stream: OCERecipientStreamer; userData: LONGINT; VAR actualCount: UInt32): OSErr;
  1267.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1268.     INLINE $303C, $0341, $AA5C;
  1269.     {$ENDC}
  1270. { Get the OCERecipient's extensionType. Safe to pass dereferenced handle(s).}
  1271. FUNCTION OCEGetRecipientType({CONST}VAR cid: CreationID): LONGINT;
  1272.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1273.     INLINE $303C, $0342, $AA5C;
  1274.     {$ENDC}
  1275.  
  1276. {
  1277. Set the OCERecipient's extensionType in the specified cid.  (Note: we do NOT
  1278. check for a nil pointer).  If the extensionType is 'entn', the cid is assumed
  1279. to be "valid" and is not touched.  Note: to properly handle non 'entn''s this
  1280. routine must and will zero the high long (source) of the cid! Safe to pass
  1281. dereferenced handle(s).
  1282. }
  1283. PROCEDURE OCESetRecipientType(extensionType: OSType; VAR cid: CreationID);
  1284.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1285.     INLINE $303C, $0343, $AA5C;
  1286.     {$ENDC}
  1287. {***************************************************************************************
  1288.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1289.  
  1290.    OCEGetAccessControlDSSpec and its corresponding data type and constants have
  1291.    moved to the OCE header from OCEAuthDir. The OCEAuthDir header includes the OCE
  1292.    header, so no changes to your code are required.
  1293.    
  1294. ***************************************************************************************}
  1295. { access categories bit numbers }
  1296.  
  1297. CONST
  1298.     kThisRecordOwnerBit            = 0;
  1299.     kFriendsBit                    = 1;
  1300.     kAuthenticatedInDNodeBit    = 2;
  1301.     kAuthenticatedInDirectoryBit = 3;
  1302.     kGuestBit                    = 4;
  1303.     kMeBit                        = 5;
  1304.  
  1305. { Values of CategoryMask }
  1306.     kThisRecordOwnerMask        = 1;
  1307.     kFriendsMask                = 2;
  1308.     kAuthenticatedInDNodeMask    = 4;
  1309.     kAuthenticatedInDirectoryMask = 8;
  1310.     kGuestMask                    = 16;
  1311.     kMeMask                        = 32;
  1312.  
  1313.  
  1314. TYPE
  1315.     CategoryMask                        = UInt32;
  1316. {
  1317. pass kThisRecordOwnerMask, kFriendsMask, kAuthenticatedInDNodeMask, kAuthenticatedInDirectoryMask,
  1318. kGuestMask, or kMeMask to this routine, and it will return a pointer to a
  1319. DSSpec that can be used in the Get or Set Access Controls calls.
  1320. }
  1321. FUNCTION OCEGetAccessControlDSSpec(categoryBitMask: CategoryMask): DSSpecPtr;
  1322.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1323.     INLINE $303C, $0345, $AA5C;
  1324.     {$ENDC}
  1325.  
  1326.  
  1327.  
  1328. {$ALIGN RESET}
  1329. {$POP}
  1330.  
  1331. {$SETC UsingIncludes := OCEIncludes}
  1332.  
  1333. {$ENDC} {__OCE__}
  1334.  
  1335. {$IFC NOT UsingIncludes}
  1336.  END.
  1337. {$ENDC}
  1338.